<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>给用户添加角色</title>
</head>
<body>
    给用户添加角色

    <form action="{:url('index/rbac/insert_role')}" method="post">
        {foreach $role as $k => $v}
            <input type="checkbox" name="role_id[]" value="{$v.id}"
                   {foreach $user_role['role_id'] as $vv}
                       {if condition="$vv eq $v['id']"}
                        checked
                       {/if}
                    {/foreach}>
            {$v.name}
        {/foreach}
        <br/>
        <input type="submit" value="提交">
    </form>
</body>
</html>